package com.cn.springcloudwechat.mapper.mapper.articleAndMenu;


import com.cn.springcloudwechat.model.articleAndMenu.YmMenuTag;
import com.cn.springcloudwechat.model.articleAndMenu.vo.YmMenuTagVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @program: YmMenuTagMapper
 * @author: Administrator
 * @create: 2018-07-17 17:10
 */
@Repository
public interface YmMenuTagMapper {

    /**
     * 添加菜单
     *
     * @param record
     * @return
     */
    int insertSelective(YmMenuTag record);

    /**
     * 菜单查询
     *
     * @param menuTagId
     * @return
     */
    YmMenuTag selectByPrimaryKey(Long menuTagId);

    /**
     * 更新菜单
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(YmMenuTag record);

    /**
     * 查询所有菜单信息
     *
     * @param record
     * @return
     */
    List<YmMenuTag> getAllMenuTag(YmMenuTag record);

    /**
     * 查询一级菜单
     *
     * @return
     */
    List<YmMenuTag> getStairMenu();

    /**
     * 查询子集菜单
     *
     * @param parentId
     * @return
     */
    List<Long> getChildMenuId(Long parentId);

    /**
     * 获取菜单树
     *
     * @param menuTagId
     * @return
     */
    List<YmMenuTagVo> getMenuTree(@Param("menuTagId") long menuTagId);


}